<!DOCTYPE html>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<!--[if lte IE 8]>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/html5.js" type="text/javascript"></script>
	<![endif]-->

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery-ui.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/default.css" />
</head>

<body>

<header>

	<div class="container">
		<div id="logo">
			<a href="<?php echo Yii::app()->request->baseUrl; ?>">
				<?php echo CHtml::image(Yii::app()->request->baseUrl.'/images/logo_beta.png', CHtml::encode(Yii::app()->name)); ?></div>
			</a>
		</div>
	</div>

</header>

<section id="page">

		<div class="container">

		<?php if(!Yii::app()->user->isGuest): ?>
			<?php $this->widget('UserInfo'); ?><!-- userinfo -->
		<?php endif; ?>

		<?php if(Yii::app()->user->isAdmin): ?>
			<div id="adminmenu">
				<?php $this->widget('zii.widgets.CMenu',array(
					'htmlOptions'=>array('class'=>'plain-menu'),
					'items'=>array(
						array('label'=>Yii::t('admin','Administration').':'),
						array('label'=>Yii::t('admin','Items'), 'url'=>array('//item/admin')),
						array('label'=>Yii::t('admin','Products'), 'url'=>array('//product/admin')),
						array('label'=>Yii::t('admin','Users'), 'url'=>array('//user/admin')),
					),
				)); ?><!-- adminmenu -->
			</div>
		<?php endif; ?>

		<?php $this->widget('application.extensions.flash.Flash', array(
			'keys'=>array('success','error'),
			'htmlOptions'=>array('class'=>'flash'),
		)); ?><!-- flashes -->

		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->

		<?php echo $content; ?>

	</div>

</section><!-- page -->

<footer class="container">

	<div class="copyright">
		Copyright &copy; <?php echo date('Y'); ?> Christoffer Niska. <?php echo Yii::t('app','All Rights Reserved'); ?>.
	</div>

</footer>


</body>
</html>